package com.navinfo.opentsp.qingqi.trackoptimize.commands;


import com.navinfo.opentsp.qingqi.trackoptimize.common.command.AbstractCommand;
import com.navinfo.opentsp.qingqi.trackoptimize.common.result.HttpCommandResultWithData;
import com.navinfo.opentsp.qingqi.trackoptimize.common.util.RegexpUtils;
import com.navinfo.opentsp.qingqi.trackoptimize.common.validation.group.GroupCommand;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 查询轨迹
 * create by wangshuai
 *
 */
@QingQiTrackOptimize
public class QueryTripPbInfoCommand extends AbstractCommand<HttpCommandResultWithData> {

    @NotNull(message = "通信号不能为空", groups = {GroupCommand.class})
    @NotBlank(message = "通信号不能为空", groups = {GroupCommand.class})
    private String terminalId;

    @Pattern(message = "beginDate格式不合法", regexp = RegexpUtils.DATE_BARS_REGEXP_HOUR_MIN_SS, groups = {GroupCommand.class})
    @NotBlank(message = "beginDate不能为空", groups = {GroupCommand.class})
    private String beginDate;

    @Pattern(message = "endDate格式不合法", regexp = RegexpUtils.DATE_BARS_REGEXP_HOUR_MIN_SS, groups = {GroupCommand.class})
    @NotBlank(message = "endDate不能为空", groups = {GroupCommand.class})
    private String endDate;

    private Boolean isExact = true;


    public String getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(String beginDate) {
        this.beginDate = beginDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getTerminalId() {
        return terminalId;
    }

    public void setTerminalId(String terminalId) {
        this.terminalId = terminalId;
    }

    public Boolean isExact() {
        return isExact;
    }

    public void setIsExact(Boolean isExact) {
        this.isExact = isExact;
    }

    public Class<? extends HttpCommandResultWithData> getResultType() {
        return HttpCommandResultWithData.class;
    }

    @Override
    public String toString() {
        return "QueryTripPbInfoCommand{" +
                "beginDate='" + beginDate + '\'' +
                ", terminalId='" + terminalId + '\'' +
                ", endDate='" + endDate + '\'' +
                ", isExact='" + isExact + '\'' +
                '}';
    }
}